package com.shiyingzi.security.model;

import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.shiyingzi.basics.model.BasicsEntity;

//@Entity
//@Table(name = "menu")
//@Where(clause = "delete_flag='N'")

@TableName("menu")
public class Menu extends BasicsEntity{
	private static final long serialVersionUID = 1177299536334407054L;

//	//  @Column(name = "menu_name", columnDefinition = "varchar(200)  default null comment '菜单名称'")
	@TableField(value = "menu_name")
	private String menuName;

//	//  @Column(name = "menu_href", columnDefinition = "varchar(1000)  default null comment '菜单链接'")
	@TableField(value = "menu_href")
	private String menuHref;
	
	//  @Column(name = "menu_icon", columnDefinition = "varchar(1000)  default null comment '菜单Icon'")
	@TableField(value = "menu_icon")
	private String menuIcon;

	//  @Column(name = "postion", columnDefinition = "varchar(1)  default null comment '位置：0横菜单，1竖菜单'")
	@TableField(value = "postion")
	private String postion;
	
	//  @Column(name = "target", columnDefinition = "varchar(1000)  default null comment '同<a>标签的target属性'")
	@TableField(value = "target")
	private String target;

	//  @Column(name = "parent_id", columnDefinition = "int(11)  default null comment '父菜单Id'")
	@TableField(value = "parent_id")
	private Integer parentId;
	
	@TableField(exist=false)
	private Menu parentMenu;
	
	@TableField(exist=false)
	private List<Menu> chlidMenus;
	
	@TableField(exist=false)
	private boolean enable;
	
	public boolean getEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getMenuHref() {
		return menuHref;
	}

	public void setMenuHref(String menuHref) {
		this.menuHref = menuHref;
	}

	public String getPostion() {
		return postion;
	}

	public void setPostion(String postion) {
		this.postion = postion;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getMenuIcon() {
		return menuIcon;
	}

	public void setMenuIcon(String menuIcon) {
		this.menuIcon = menuIcon;
	}
	
	public Menu getParentMenu() {
		return parentMenu;
	}

	public void setParentMenu(Menu parentMenu) {
		this.parentMenu = parentMenu;
	}

	public List<Menu> getChlidMenus() {
		return chlidMenus;
	}

	public void setChlidMenus(List<Menu> chlidMenus) {
		this.chlidMenus = chlidMenus;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("MeasureMenu [menuName=").append(menuName).append(", menuHref=").append(menuHref)
				.append(", menuIcon=").append(menuIcon).append(", postion=").append(postion).append(", target=")
				.append(target).append(", parentId=").append(parentId).append(", parentMenu=").append(parentMenu)
				.append(", chlidMenus=").append(chlidMenus).append(", enable=").append(enable).append("]");
		return builder.toString();
	}
}
